import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { PlayConfig } from './entities/play_config.entity';
import { CreatePlayConfigDto } from './dto/create-play_config.dto';
import { UpdatePlayConfigDto } from './dto/update-play_config.dto';

@Injectable()
export class PlayConfigService {
  constructor(
    @InjectRepository(PlayConfig)
    private readonly userRepository: Repository<PlayConfig>,
  ) { }

  create(createPlayConfigDto: CreatePlayConfigDto) {
    return 'This action adds a new playConfig';
  }

  async findAll() {
    return await this.userRepository.query('select * from play_config');
  }

  findOne(id: number) {
    return `This action returns a #${id} playConfig`;
  }

  update(id: number, updatePlayConfigDto: UpdatePlayConfigDto) {
    return `This action updates a #${id} playConfig`;
  }

  remove(id: number) {
    return `This action removes a #${id} playConfig`;
  }
}
